/**
 * 
 */

/**
 * @author sz
 *
 * create time：2012-9-26
 */

interface Event{
	void invoke();
}

class ConcreteEvent implements Event{
	
	public void invoke() {
		
		System.out.println("事件被调用");
		
	}
	
}

public class CallBack {

	private Event event;
	
	public CallBack(Event event){
		this.event = event;
	}
	
	public void  onClick(){
		event.invoke();
	}
	
	public static void main(String[] args) {
		CallBack callBack = new CallBack(new ConcreteEvent());
		
		callBack.onClick();
	}
}

